#ifndef _collect_data_h
#define _collect_data_h

#include "sendmsg_type.h"
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "LPC11xx.h"
#include "temp_hum.h"
#include "light.h"
#include "i2c.h"
#include "adc.h"
#include "acc.h"
#include "spi_uart.h"
#include "gpio.h"
#include "oled2864.h"
#include "uart.h"
#include "timer32.h"

void collect_data(tem_t *tem,hum_t *hum,light_t *light);
uint32_t adc_ret(adc_t *adc_c);
void acc_ret(acc_t *acc_r);
void get_state(status_t *state_c);
void fill_env(env_t *env_msg,tem_t t,hum_t h,acc_t ac,adc_t ad,light_t l,status_t s);
void fill_data(data_t *data,uint8_t datatype,rfid_t *r,env_t *e,warning_t *w);
void fill_message(send_msg_t *message,uint8_t type,data_t *data_come);
void collect_dataall(send_msg_t *msg_t);
void waring_data(send_msg_t *msg_t);

#endif
